﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using model;
using dao;

namespace business
{
    public class LoaibaivietBUS
    {
        LoaibaivietDao loaiBaiVietDao = new LoaibaivietDao();
        public List<Loaibaiviet> GetListAllLoaiBaiviet()
        {
            return loaiBaiVietDao.GetListAllLoaiBaiviet();
        }

        public Loaibaiviet GetBaivietaByName(string nameBaiviet)
        {
            List<Loaibaiviet> lstLoaibaiviet = loaiBaiVietDao.GetBaivietByName(nameBaiviet);
            if (lstLoaibaiviet.Count > 0)
                return lstLoaibaiviet[0];
            else
                return null;
        }
    }
}
